package com.wolf.etl.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.wolf.provider.order.info.FieldInfo;
import com.wolf.provider.order.info.IdInfo;
import com.wolf.provider.order.info.TableInfo;

import java.util.Date;

/**
 * @author sdyang
 * @date 2019/11/18 15:27
 **/
@TableInfo(value = "etl_instance")
public class EtlInstanceModel {

    @IdInfo
    private Long id;

    @FieldInfo(value = "code")
    private String code;

    @FieldInfo(value = "name")
    private String name;

    @FieldInfo(value = "task_id")
    private Long task_id;

    @FieldInfo(value = "ip")
    private String ip;

    @FieldInfo(value = "port")
    private Integer port;

    @FieldInfo(value = "status")
    private Integer status;

    @FieldInfo(value = "remark")
    private String remark;

    @FieldInfo(value = "weight")
    private Integer weight;

    @FieldInfo(value = "max_page_num")
    private Integer max_page_num;

    /**
     * 创建人
     */
    @FieldInfo(value = "creator")
    private String creator = "admin";

    /**
     * 创建时间
     */
    @FieldInfo(value = "create_time")
    private Date create_time = new Date();

    /**
     * 修改人
     */
    @JSONField(format = "yyyy-MM-dd")//数据库导出页面时json格式化
    @FieldInfo(value = "modified_person")
    private String modified_person;

    /**
     * 修改时间
     */
    @JSONField(format = "yyyy-MM-dd")//数据库导出页面时json格式化
    @FieldInfo(value = "modified_time")
    private Date modified_time;

    /**
     * 租户id
     */
    @FieldInfo(value = "client_id")
    private Long client_id = 100L;

    @FieldInfo(value = "page_num")
    private Integer page_num = 0;

    @FieldInfo(value = "hash")
    private String hash;


    @FieldInfo(value = "mac_address")
    private String mac_address;

    @FieldInfo(value = "container_id")
    private String container_id;

    public String getMac_address() {
        return mac_address;
    }

    public void setMac_address(String mac_address) {
        this.mac_address = mac_address;
    }

    public String getContainer_id() {
        return container_id;
    }

    public void setContainer_id(String container_id) {
        this.container_id = container_id;
    }

    public String getHash() {
        return hash;
    }

    public void setHash(String hash) {
        this.hash = hash;
    }

    public void addPageNum() {
        this.page_num = this.page_num + 1;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getTask_id() {
        return task_id;
    }

    public void setTask_id(Long task_id) {
        this.task_id = task_id;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }



    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public String getModified_person() {
        return modified_person;
    }

    public void setModified_person(String modified_person) {
        this.modified_person = modified_person;
    }

    public Date getModified_time() {
        return modified_time;
    }

    public void setModified_time(Date modified_time) {
        this.modified_time = modified_time;
    }

    public Long getClient_id() {
        return client_id;
    }

    public void setClient_id(Long client_id) {
        this.client_id = client_id;
    }

    public Integer getPage_num() {
        return page_num == null?0:page_num;
    }

    public void setPage_num(Integer page_num) {
        this.page_num = page_num;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public Integer getMax_page_num() {
        return max_page_num;
    }

    public void setMax_page_num(Integer max_page_num) {
        this.max_page_num = max_page_num;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
